import http from "@/utils/fetch";

// 归还地址列表
export function returnAddressList(params) {
  return http.post("/Supplier/ReturnAddress/returnAddressList", params);
}
// 添加或编辑归还地址
export function addOrEditReturnAddress(params) {
  return http.post(
    "/Supplier/ReturnAddress/addOrEditReturnAddress",
    params,
    true
  );
}
// 根据id查询归还地址
export function returnAddressById(id) {
  return http.get("/Supplier/ReturnAddress/returnAddressById", { id });
}
// 根据id删除归还地址
export function delReturnAddress(id) {
  return http.post("/Supplier/ReturnAddress/delReturnAddress", { id }, true);
}
// 租赁地址列表
export function leaseAddressList(params) {
  return http.post("/Supplier/LeaseAddress/leaseAddressList", params);
}
// 添加或编辑租赁地址
export function addOrEditLeaseAddress(params) {
  return http.post(
    "/Supplier/LeaseAddress/addOrEditLeaseAddress",
    params,
    true
  );
}
// 根据id查询租赁地址
export function leaseAddressById(id) {
  return http.get("/Supplier/LeaseAddress/leaseAddressById", { id });
}
// 根据id删除租赁地址
export function delLeaseAddress(id) {
  return http.post("/Supplier/LeaseAddress/delLeaseAddress", { id }, true);
}
// 店铺基础信息
export function shopBaseInfo() {
  return http.get("/Supplier/ShopInfo/shopBaseInfo");
}
// 根据id编辑店铺基础信息
export function editShopBaseInfoById(params) {
  return http.post("/Supplier/ShopInfo/editShopBaseInfoById", params, true);
}
// 店铺主体信息
export function shopMainInfo() {
  return http.get("/Supplier/ShopInfo/shopMainInfo");
}
// 店铺二维码
export function shopQrcode() {
  return http.get("/Supplier/ShopInfo/shopQrcode");
}
// 商品排序列表
export function goodsSortList(params) {
  return http.post("/Supplier/HotShop/goodsSortList", params);
}
// 根据id编辑商品、店铺分类、店铺关联商品的排序
export function editSort(params) {
  return http.post("/Supplier/HotShop/editSort", params, true);
}
// 店铺轮播图设置列表
export function shopBannerList(params) {
  return http.post("/Supplier/HotShop/shopBannerList", params);
}
// 根据id删除店铺轮播图
export function delShopBanner(id) {
  return http.post("/Supplier/HotShop/delShopBanner", { id }, true);
}
// 添加或编辑店铺轮播图
export function addOrEdiShopBanner(params) {
  return http.post("/Supplier/HotShop/addOrEdiShopBanner", params, true);
}
// 根据id查询店铺轮播图
export function shopBannerById(id) {
  return http.get("/Supplier/HotShop/shopBannerById", { id });
}
// 获取商品信息
export function getGoods(params) {
  return http.post("/Supplier/HotShop/getGoods", params);
}
// 店铺分类列表
export function shopCategoryList(params) {
  return http.post("/Supplier/HotShop/shopCategoryList", params);
}
// 根据id删除店铺分类
export function delShopCategory(id) {
  return http.post("/Supplier/HotShop/delShopCategory", { id }, true);
}
// 添加店铺分类
export function addShopCategory(cat_name) {
  return http.post("/Supplier/HotShop/addShopCategory", { cat_name }, true);
}
// 店铺关联商品列表
export function shopGoodsList(params) {
  return http.post("/Supplier/HotShop/shopGoodsList", params);
}
// 根据id删除店铺关联商品
export function delShopGoods(id) {
  return http.post("/Supplier/HotShop/delShopGoods", { id }, true);
}
// 添加店铺关联商品
export function addShopGoods(params) {
  return http.post("/Supplier/HotShop/addShopGoods", params, true);
}
